//
//  AddressModel.swift
//  JiaoZiTaxi
//
//  Created by hc-101 on 2024/7/10.
//

import SwiftUI

struct AddressModel: Codable, Equatable, Identifiable, Hashable {
    var id, name: String?
    let longname: String?
    let intro, phone: String?
    var picture, openid, jianceHangye, address: String?
    let status, time, share: Int?
    let latitude, longitude: Double?
    let headavitor, owner: String?
    let url: String?
    let categoryCode: Int?
    let orderss: Int?
    let type, lang: String?
    let laosPhone: String?
    
    enum CodingKeys: String, CodingKey, Equatable, Hashable {
        case id = "id"
        case name, longname, openid, intro, phone, picture
        case jianceHangye = "jiance_hangye"
        case latitude, longitude
        case status, time, share
        case address, headavitor, owner, url
        case categoryCode = "category_code"
        case orderss
        case type, lang
        case laosPhone = "laos_phone"
    }
    
}

extension AddressModel {
  static let all:[AddressModel] = [
    AddressModel(id: "", name: "", longname: "", intro: "", phone: "", picture: "", openid: "", jianceHangye: "", address: "", status: 0, time: 0, share: 0, latitude: 0, longitude: 0, headavitor: "", owner: "", url: "", categoryCode: 0, orderss: 0, type: "", lang: "", laosPhone: "")
  ]
}

